package com.ishansong.ticket.controller.base;

import java.util.Map;

public class MappingJacksonJsonView extends
		org.springframework.web.servlet.view.json.MappingJackson2JsonView {

	protected Object filterModel(Map<String, Object> model) {
		Map<?, ?> result = (Map<?, ?>) super.filterModel(model);
		if(result.get("results") != null) {
			return result.get("results");
		} else {
			return result;
		}
	}

	/**
	 *
	 */
	class Status{
		public int status;
		public Object data;
		public Status(int status, Object data) {
			this.data   = data;
			this.status = status;
		}
		public int getStatus() {
			return status;
		}
		public void setStatus(int status) {
			this.status = status;
		}
		public Object getData() {
			return data;
		}
		public void setData(Object data) {
			this.data = data;
		}
		
	}
}
